#ifndef PICSTATEBTN_H
#define PICSTATEBTN_H

#include <QPushButton>
#include "const_enum.h"

class PicStateBtn : public QPushButton
{
    Q_OBJECT
public:
    explicit PicStateBtn(QWidget *parent = nullptr);
    void SetIcons(const QString &normal, const QString &hover, const QString &pressed,
                  const QString &normal_2, const QString &hover_2, const QString &pressed_2);
public slots:
    void SlotStart();
    void SlotStop();
protected:
    virtual bool event(QEvent*)override;
private:
    void setNormalIcon();
    void setHoverIcon();
    void setPressIcon();
    void setNormal2Icon();
    void setHover2Icon();
    void setPress2Icon();
    //播放
    QString _normal;
    QString _hover;
    QString _pressed;
    //暂停
    QString _normal_2;
    QString _hover_2;
    QString _pressed_2;
    PicBtnState _cur_state;

};

#endif // PICSTATEBTN_H
